Hi,
I want to reference a list of users in Lync that do not have a HostedVoicemailPolicy applied. Please can someone help me..
I have a list of users that form a txt file I am referencing called $lynctest.
User1
User2
User3
NoSuchUser1
NoSuchUser2
I have the following and its not catching the error so that I can output to another file.
try
{
foreach($lyncuser in $lynctest)
{
Get-CsUser -Identity $lyncuser | select displayname, hostedvoicemailpolicy
}
catch
{
write-host "$lyncuser user not found" > "c:\datatemp\listofusers.txt"
}